#include <iostream>
using namespace std;
int main()
{
float n,m;
cin>>n>>m;
if(n<50)m=n;
else if(n<=150)m=n*0.9;
else m=50+100*0.9+(n-150)*0,8;
cout <<m;
return 0;	
}
